#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int a[5];
		cin>>a[0]>>a[1]>>a[2]>>a[3];
		int num1 = 0;
		int num0 = 0;
		int flag = 0;
		for(int i = 0;i<4;i++)
		{
			if(a[i]%2) num1++;
			else num0++;
		}
		if(num1==1&&num0==3) flag = 1;
		else if(num0==4) flag = 1;
		num1 = 0;
		num0 = 0;
		for(int i = 0;i<3;i++)
		{
			if((a[i]-1)%2&&(a[i]-1)>=0) num1++;
			else if((a[i]-1)%2==0&&(a[i]-1)>=0) num0++;
		}
		if((a[3]+3)%2) num1++;
		else num0++;
		if(num1==1&&num0==3) flag = 1;
		else if(num0==4) flag = 1;
		num1 = 0;
		num0 = 0;
		for(int i = 0;i<3;i++)
		{
			if((a[i]-2)%2&&(a[i]-2)>=0) num1++;
			else if((a[i]-2)%2==0&&(a[i]-2)>=0) num0++;
		}
		if((a[3]+6)%2) num1++;
		else num0++;
		if(num1==1&&num0==3) flag = 1;
		else if(num0==4) flag = 1;
		if(flag) printf("Yes\n");
		else printf("No\n");
	}
} 
